Skip to content

rustdoc: on mobile, make the sidebar full width and linewrap #139831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lolbinarycat
Copy link
Contributor

this is because the mobile sidebar cannot be resized, unlike on desktop.

@rustbot
Copy link
Collaborator

rustbot commented Apr 15, 2025

r? @notriddle

rustbot has assigned @notriddle.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Apr 15, 2025
@rust-log-analyzer

This comment has been minimized.

@lolbinarycat
Copy link
Contributor Author

@GuillaumeGomez I'm really not sure how changing the size of these elements could cause these test failures, got a clue?

@GuillaumeGomez
Copy link
Member

Please add a screenshot. Also, what's the reasoning behind this change? What would it improve?

@lolbinarycat
Copy link
Contributor Author

Motivation is how much stuff gets needlessly truncated:

before screenshot

will add screenshot for what this looks like after the change once I have my new laptop set up more.

@lolbinarycat
Copy link
Contributor Author

here's what it looks like after the change:

screenshot

@lolbinarycat
Copy link
Contributor Author

This also increases consistency with mdBook, which has a much wider sidebar by default

mdBook screenshot

@GuillaumeGomez GuillaumeGomez removed the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 25, 2025
@GuillaumeGomez
Copy link
Member

The difference is (was?) that mdBook and even the rustdoc file panel are trees whereas the rustdoc sidebar is (was?) a list.

Anyway, I don't mind the change, we'll just do an FCP first to ensure that everyone else agrees with it. Once done, I can check what's wrong with the gui test failure.

@rfcbot fcp merge

@rfcbot
Copy link
Collaborator

rfcbot commented Apr 25, 2025

Team member @GuillaumeGomez has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Apr 25, 2025
@bors
Copy link
Collaborator

bors commented May 10, 2025

☔ The latest upstream changes (presumably #140895) made this pull request unmergeable. Please resolve the merge conflicts.

@lolbinarycat lolbinarycat force-pushed the rustdoc-mobile-sidebar branch from 94558c5 to 59bdc04 Compare May 16, 2025 09:51
this is because the mobile sidebar cannot be resized,
unlike on desktop.
@lolbinarycat lolbinarycat force-pushed the rustdoc-mobile-sidebar branch from 59bdc04 to 5326fc9 Compare May 16, 2025 09:53
@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels May 16, 2025
@rfcbot
Copy link
Collaborator

rfcbot commented May 16, 2025

🔔 This is now entering its final comment period, as per the review above. 🔔

@camelid
Copy link
Member

camelid commented May 16, 2025

Is there a reason this is still marked as draft?

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
.......... (130/138)
.....FFF   (138/138)


/checkout/tests/rustdoc-gui/notable-trait.goml notable-trait... FAILED
[ERROR] `tests/rustdoc-gui/notable-trait.goml` line 249: expected 1 elements, found 0: for command `assert-count: ("//*[@class='tooltip popover']", 1)`

/checkout/tests/rustdoc-gui/pocket-menu.goml pocket-menu... FAILED
[ERROR] `tests/rustdoc-gui/pocket-menu.goml` line 73: `#settings-menu .popover` not found: for command `assert-css: ("#settings-menu .popover", {"display": "block"})`
[ERROR] `tests/rustdoc-gui/pocket-menu.goml` line 81: `#settings-menu a` not found: for command `click: "#settings-menu a"`

/checkout/tests/rustdoc-gui/sidebar-mobile.goml sidebar-mobile... FAILED
[ERROR] `tests/rustdoc-gui/sidebar-mobile.goml` line 37: The following errors happened (for selector `.sidebar`): [expected `-1000px` for key `left`, found `0px`]: for command `assert-css: (".sidebar", {"display": "block", "left": "-1000px"})`
[ERROR] `tests/rustdoc-gui/sidebar-mobile.goml` line 41: The following errors happened (for selector `.sidebar`): [expected `0px` for key `left`, found `-1000px`]: for command `assert-css: (".sidebar", {"left": "0px"})`
[ERROR] `tests/rustdoc-gui/utils.goml` line 10
    from `tests/rustdoc-gui/sidebar-mobile.goml` line 66
    from `tests/rustdoc-gui/sidebar-mobile.goml` line 78: Error: The CSS selector "#settings" was not found: for command `wait-for: "#settings"`

Error: ()
Build completed unsuccessfully in 0:05:03
  local time: Fri May 16 10:48:20 UTC 2025
  network time: Fri, 16 May 2025 10:48:21 GMT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants